package com.ruoyi.demo.service.impl;

import com.ruoyi.demo.domain.*;
import com.ruoyi.demo.mapper.*;
import com.ruoyi.demo.service.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.*;

@Service
public class MonitorPointDemoServiceImpl implements MonitorPointDemoService {
    @Autowired
    private MonitorPointDemoMapper monitorPointMapper;

    @Override
    public void deleteMonitorNotInList(List<MonitorPointDemo> list) {
        monitorPointMapper.deleteMonitorNotInList(list);
    }

    @Override
    public int mergeMonitorListToMonitorTable(List<MonitorPointDemo> monitorPointList) {
        return monitorPointMapper.mergeMonitorListToMonitorTable(monitorPointList);
    }
    @Override
    public HashMap<String, Integer> selectTotalMonitorCountAndOnlineMonitorCount() {
        return monitorPointMapper.selectTotalMonitorCountAndOnlineMonitorCount();
    }

    @Override
    public List<CoalMineDemo> selectCoalMinesWithMonitors(String monitorName) {
        return monitorPointMapper.selectCoalMinesWithMonitors(monitorName);
    }
    @Override
    public MonitorOfflineAlarmSettingsDemo selectMonitorOfflineAlarmSettings() {
        return monitorPointMapper.selectMonitorOfflineAlarmSettings();
    }
    @Override
    public List<MonitorPointDemo> selectMonitorsThatNeedToSendOfflineAlarm(Integer setMinutes) {
        return monitorPointMapper.selectMonitorsThatNeedToSendOfflineAlarm(setMinutes);
    }
    @Override
    public int insertMonitorOfflineAlarm(List<MonitorPointDemo> monitorListThatOfflineTimeout) {
        return monitorPointMapper.insertMonitorOfflineAlarm(monitorListThatOfflineTimeout);
    }
    @Override
    public int updateAlarmStatusAsSent(List<MonitorPointDemo> monitorListThatOfflineTimeout) {
        return monitorPointMapper.updateAlarmStatusAsSent(monitorListThatOfflineTimeout);
    }
}
